<?php

namespace app\command;

use app\api\controller\DulizhanPackage;
use think\console\Input;
use think\console\Output;
use think\console\Command;
use app\common\service\JinyiApiService;
use app\common\service\TiktokPackageApiService;
use think\facade\Db;
class DulizhanCommand extends Command
{
    protected function configure()
    {
        $this->setName('webDulizhan')
            ->setDescription('webDulizhan');
    }

    protected function execute(Input $input, Output $output)
    {
        $info = Db::name('webhooks')
            ->where('order_id',577093212153746090)
            ->order('id desc')
            ->find();
        (new TiktokPackageApiService())->get_operate_order($info);die;

        $data = [
            'order_id' => '577056262462214226',
            'warehouse_id' => '5',
            'type' => 1,
            'shop_id' => 16,
        ];
        
        $res    =  (new JinyiApiService())->tracking_number_update_consumer($data);die;
        halt($res);
        

        //整理货号跟件数
        // (new DulizhanPackage())->AddSKUDetails();

        //整理订单是否被结算
        (new DulizhanPackage())->HasTheOrderBeenSettled();
    }

}